SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 66647: Trying to subset a Google BigQuery table based on a Boolean variable might result in a performance issue

DetailsHotfixAboutRate It

When you try to subset a Google BigQuery table based on a Boolean variable, you might experience slow performance. This issue occurs because SAS® software does not have a Boolean data type, so it uses a numeric data type in which 1 is true and 0 is false. When SAS tries to pass the query to BigQuery, it includes the comparison syntax as entered in SAS. The BigQuery database expects to see variable = true and not variable = 1. This behavior results in BigQuery issuing an error similar to the following:

ERROR: [42000] Error: googleapi: Error 400: No matching signature for operator = for argument types: BOOL, INT64. Supported signatures: ANY = ANY at [1:70], invalidQuery

As a result of the BigQuery error, SAS removes the comparison in the second query that is passed to the database. If the query also included a join, order by, summarization, or a DISTINCT keyword, then that item might also be removed from the second query that is passed to the database. In most cases, the BigQuery error is not written to the SAS log to indicate that there was problem, so it is likely that there will be no indication that any of this has occurred. The SASTRACE output will incorrectly indicate that the query was processed by database.  

Due to the probable increase in the number of rows being read and more of the processing of the query being done by SAS rather than in the database, the query might take longer than if all of the processing had been done by the database.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to Google BigQueryLinux for x64V.03.052020.1.1ViyaViya
SAS SystemSAS Data Connector to Google BigQueryLinux for x64V.03.052020.1.1ViyaViya
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.